import { browser } from "./index";

export function sendMessage(action, data = {}) {
  if (browser.ios)
    return window.webkit.messageHandlers[action].postMessage(data);
  if (browser.android) {
    return window.partnerObj[action](JSON.stringify(data));
  }
}
